package com.promise.jokerdream.ui.theme

import androidx.compose.foundation.IndicationNodeFactory
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.InteractionSource
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.drawscope.ContentDrawScope
import androidx.compose.ui.node.DelegatableNode
import androidx.compose.ui.node.DrawModifierNode

/**
 * 无水波纹效果的自定义 Indication
 * 使用新的 IndicationNodeFactory API
 */
object NoRippleIndication : IndicationNodeFactory {
    override fun create(interactionSource: InteractionSource): DelegatableNode {
        return NoRippleIndicationNode()
    }
    
    override fun hashCode(): Int = -1
    
    override fun equals(other: Any?) = other === this
}

/**
 * 无水波纹的 IndicationNode 实现
 * 什么都不绘制，完全透明的交互反馈
 */
private class NoRippleIndicationNode : Modifier.Node(), DrawModifierNode {
    override fun ContentDrawScope.draw() {
        // 不绘制任何内容，保持完全透明
        drawContent()
    }
}
